package com.lg.business.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lg.business.entity.User;
import com.lg.business.service.UserServiceImpl;
import com.lg.db.page.PageRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(value = "用户管理", tags = "{用户管理}")
@RequestMapping(value = "/userInfo")
public class UserController {
    @Autowired
    UserServiceImpl userService;


    @ApiOperation("查询用户管理")
    @RequestMapping(value = "/pageQuery", method = RequestMethod.POST)
    public IPage<User> selectPage(@RequestBody PageRequest pageRequest) {
        IPage<User> userIPage = userService.pageQuery(pageRequest);
        return userIPage;
    }
}
